#include "UServer.h"
#include <QtWidgets/QApplication>
#include "ubooksdatabase.h"
#include "ulog.h"

void test0();
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //qInstallMessageHandler(ULog::MessWriteLog);//安装消息处理程序
    UServer w;
    //test0();
    return a.exec();
}

void test0()
{
UBooksDatabase::Instance()->addBook("9787535498074", "红楼梦", "曹雪芹", "长江文艺出版社", "2017-05-01", "icon/cover.png");
UBooksDatabase::Instance()->addBook("9787530213496", "西游记", "吴承恩", "北京科学技术出版社", "2011-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544262075", "水浒传", "施耐庵", "南海出版公司", "2012-09-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535467009", "三国演义", "罗贯中", "长江文艺出版社", "2015-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544351604", "百年孤独", "加西亚·马尔克斯", "南海出版公司", "2011-06-01", "icon/cover.png");  
  
UBooksDatabase::Instance()->addBook("9787563399001", "围城", "钱钟书", "人民文学出版社", "2018-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544645857", "边城", "沈从文", "北京十月文艺出版社", "2017-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532779862", "骆驼祥子", "老舍", "上海古籍出版社", "2016-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535487323", "呼兰河传", "萧红", "长江文艺出版社", "2019-03-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787530218471", "子夜", "茅盾", "北京十月文艺出版社", "2013-05-01", "icon/cover.png");  
  
UBooksDatabase::Instance()->addBook("9787532163933", "活着", "余华", "上海文艺出版社", "2017-05-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544253494", "许三观卖血记", "余华", "南海出版公司", "2013-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787530213519", "兄弟", "余华", "北京十月文艺出版社", "2016-05-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544644346", "第七天", "余华", "北京十月文艺出版社", "2018-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532153894", "暗算", "麦家", "上海文艺出版社", "2017-06-01", "icon/cover.png");  
  
UBooksDatabase::Instance()->addBook("9787532167849", "解忧杂货店", "东野圭吾", "上海文艺出版社", "2017-11-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544275330", "白夜行", "东野圭吾", "南海出版公司", "2017-04-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532153900", "嫌疑人X的献身", "东野圭吾", "上海文艺出版社", "2017-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532169478", "放学后", "东野圭吾", "上海文艺出版社", "2018-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544646580", "红手指", "东野圭吾", "南海出版公司", "2018-04-01", "icon/cover.png");  
  
UBooksDatabase::Instance()->addBook("9787535495514", "追风筝的人", "卡勒德·胡赛尼", "长江文艺出版社", "2016-06-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535496448", "灿烂千阳", "卡勒德·胡赛尼", "长江文艺出版社", "2017-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544645628", "群山回唱", "卡勒德·胡赛尼", "南海出版公司", "2018-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787544647765", "偷影子的人", "马克·李维", "南海出版公司", "2017-07-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532167598", "如果墙会说话", "艾米", "上海文艺出版社", "2017-09-01", "icon/cover.png");
  
UBooksDatabase::Instance()->addBook("9787544644476", "小王子", "安东尼·德·圣埃克苏佩里", "南海出版公司", "2018-03-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535498340", "哈利·波特与魔法石", "J.K.罗琳", "长江文艺出版社", "2019-01-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532167801", "哈利·波特与密室", "J.K.罗琳", "上海文艺出版社", "2017-10-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535498753", "哈利·波特与阿兹卡班的囚徒", "J.K.罗琳", "长江文艺出版社", "2018-06-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787532169065", "哈利·波特与火焰杯", "J.K.罗琳", "上海文艺出版社", "2018-02-01", "icon/cover.png");  
UBooksDatabase::Instance()->addBook("9787535499091", "哈利·波特与凤凰社", "J.K.罗琳", "长江文艺出版社", "2018-09-01", "icon/cover.png");
}